package com.example.demo.DAO;

import com.example.demo.Entity.Statistics;
import com.example.demo.Entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Repository()
public interface UserDao {
    /******* 添加用户 ********/
    @Insert("insert into Operation(account,password)values(#{account},#{password})")
    void addUser(User user);
    /******** 登录验证*********/
    @Select("select * from user where account = #{account} and password = #{password}")
    User isLogin(User user);

    /**********修改账务记录*************/
    @Update("UPDATE user SET password = #{password} where account = #{account}")
    Integer upPassword(User user);
}
